import { RouteRecordRaw } from "vue-router"

const Layouts = () => import("@/layouts/index.vue")

export default [
  {
    // 广告位
    path: "/advertising-manage",
    component: Layouts,
    redirect: "/advertising-manage",
    meta: {
      roles: ["admin"]
    },
    children: [
      {
        path: "",
        component: () => import("@/views/advertising-manage/index.vue"),
        name: "advertisingManage",
        meta: {
          title: "广告位管理",
          svgIcon: "advertising",
          roles: ["admin"]
        }
      }
    ]
  },
  {
    // 岗位审核
    path: "/post-audit",
    component: Layouts,
    redirect: "/post-audit",
    meta: {
      roles: ["admin"]
    },
    children: [
      {
        path: "",
        component: () => import("@/views/post-audit/index.vue"),
        name: "postAudit",
        meta: {
          title: "岗位审核",
          svgIcon: "post-audit",
          roles: ["admin"]
        }
      }
    ]
  },
  {
    // 用户管理
    path: "/user-manage",
    component: Layouts,
    redirect: "/user-manage",
    meta: {
      roles: ["admin"]
    },
    children: [
      {
        path: "",
        component: () => import("@/views/user-manage/index.vue"),
        name: "userManage",
        meta: {
          title: "用户管理",
          svgIcon: "user-manage",
          roles: ["admin"]
        }
      }
    ]
  }
] as RouteRecordRaw[]
